<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理中心</title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>

<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jquery.colorbox.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jQselect.js"></script>
<link href="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/colorbox2.css" rel="stylesheet" type="text/css"/>
</head>

<body>
    <div id="main">
		<div id="topMenu">
			<div id="navigation">当前位置：<a href="<?php echo $this->projectUrl(array('controller'=>'partner', 'action'=>'index'));?>">商家列表</a> &gt; <a href="<?php echo $this->projectUrl(array('controller'=>'partner-product', 'action'=>'index'));?>">产品列表</a> &gt; <span id="focus">平台管理</span></div>
			<div id="topOtherMenu"><input type="button" name="insert" id="insert" value="添加" class="button" onclick="location.href='<?php echo $this->projectUrl(array('action'=>'insert','partnerCode'=>$this->productRow['partnerCode'], 'productCode'=>$this->productRow['code'], 'backUrl'=>urlencode($this->pageUrl)));?>';" /></div>
		</div>
        <div id="body">
            <div id="content">
                <form id="listForm" name="listForm" method="post" action="<?php echo $this->projectUrl(array('controller'=>'partnerproduct', 'action'=>'delete', 'backUrl'=>urlencode($this->pageUrl)));?>">
                    <table class="table">
                        <tr class="subject">
                            <td width="5%" class="checkBoxTd">选择</td>
                            <td width="8%">产品名称</td>
                            <td>操作系统</td>
                            <td>产品入库时间</td>
                            <td width="10%" class="checkBoxTd">操作</td>
                        </tr>
                        <?php
                            foreach ( $this->partners as $key=>$val){
                        ?>
                        <tr>
                            <td width="5%" class="checkBoxTd"><input type="checkbox" name="selectId[]" id="select0" class="selectCheckBox" value="<?php echo $val['id'];?>" /></td>
                            <td><?php echo $val['productName'];?></td>
                            <td><?php echo $val['osName'];?></td>
                            <td><?php echo $val['addTime'];?></td>
                            <td width="10%" class="checkBoxTd">
                                <a href="<?php echo $this->projectUrl(array('controller'=>'partner-product-version', 'action'=>'list', 'osname'=>$val['osName'], 'productCode'=>$val['productCode']));?>"> 版本管理</a> <a href="<?php echo $this->projectUrl(array('controller'=>'product-platform', 'action'=>'update', 'partnerCode'=>$val['partnerCode'], 'productCode'=>$val['productCode'], 'id'=>$val['id'], 'backUrl'=>urlencode($this->pageUrl)));?>">编辑</a>       
							</td>
                        </tr>
                        <?php }?>
                    </table>
                    <table class="controlTable">
                        <tr>
                            <td align="left">
                                <input type="button" name="all" id="all" value="全选" class="button" onclick="$('.selectCheckBox').attr('checked', true);"/>
                                <input type="button" name="cancel" id="cancel" value="取消" class="button" onclick="$('.selectCheckBox').attr('checked', false);"/>
                                <input type="button" name="delete" id="delete" value="删除选中" class="button" onclick="return del();"/>
                            </td>
                             <td align="right" class="paginator" colspan="6">
                             	<?php echo $this->pageString;?>
                             </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
</div>
<script language="javascript">
function del()
{
    if (confirm('确定删除吗？')) {
        $("#listForm").attr('action', '<?php echo $this->projectUrl(array('controller'=>'product-platform', 'action'=>'delete', 'backUrl'=>urlencode($this->pageUrl)));?>');
        $("#listForm").submit();
        return true;
    } else {
        return false;
    }
}
</script>
</body>
</html>